import Vue from 'vue'
import Router from 'vue-router'

import Root from '@/components/Root'
import Login from '@/components/Login'
import Home from '@/components/Home'
import AdminList from '@/components/AdminList'
import MemberList from '@/components/MemberList'
import LogList from '@/components/LogList'
import PermissionManage from '@/components/PermissionManage'
import RoleManage from '@/components/RoleManage'
import MenuManage from '@/components/MenuManage'

Vue.use(Router);

export default new Router({
    routes: [{
        path: '/',
        name: 'Login',
        component: Login
    }, {
        path: '/root',
        name: 'Root',
        component: Root,
        children: [{
          path: '/home',
          component: Home,
          meta: [],
        }, {
          path: '/memberList',
          component: MemberList,
          meta: [],
        }, {
          path: '/adminList',
          component: AdminList,
          meta: [],
        }, {
          path: '/logList',
          component: LogList,
          meta: [],
        }, {
          path: '/permissionManage',
          component: PermissionManage,
          meta: [],
        }, {
          path: '/roleManage',
          component: RoleManage,
          meta: [],
        }, {
            path: '/menuManage',
            component: MenuManage,
            meta: [],
        }
        ]
    }]
})
